import Exceptions.BigFileException;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.*;
public class Main {
    public static void main(String args[]) throws IOException, BigFileException {
        Anagram anagram=new Anagram();
        Output output=new Output();
        Set<String> set=new HashSet<String>();
        try{
            anagram.search();
        }
        catch (FileNotFoundException e){
            System.out.println("No such path");
            e.printStackTrace();
        }
        catch (BigFileException e){
            e.printStackTrace();
        }
        catch (IOException e){
            e.printStackTrace();
        }
        try{
            output.write(set);

        }catch (FileNotFoundException e){
            System.out.println("No such path");
            output.write(set);
        }
        catch (IOException e){
            e.printStackTrace();
        }
        try{
            anagram.getWordsForSearch();

        }catch (FileNotFoundException e){
            System.out.println("No such path");
            anagram.getWordsForSearch();
        }
        catch (IOException e){
            e.printStackTrace();
        }
        try{
            anagram.getWordsFromFile();

        }catch (FileNotFoundException e){
            System.out.println("No such path");
            anagram.getWordsFromFile();
        }
        catch (IOException e){
            e.printStackTrace();
        }
        catch (BigFileException e){
            e.printStackTrace();
        }

    }
}

